import os
from maya import cmds
text = "+ MYRig any PATH"
path = os.path.expanduser("~") + "/maya/modules"
if not os.path.isdir(path):
    os.makedirs(path)
with open(path+"/MYRig.mod", "w") as fp:
    fp.write(text.replace("PATH", os.path.abspath(__file__+"/../../")))
cmds.loadPlugin(os.path.abspath(__file__+"/../../plug-ins/MYRig.mll"))
